package com.newtouch.cq.base.starter.lang.em;

import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.log.Log;
import cn.hutool.log.LogFactory;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.newtouch.cq.lang.annotation.InitEnumToMapAn;
import com.newtouch.cq.lang.em.BaseExceptionEnum;
import com.newtouch.cq.lang.exception.MccBizException;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 功能类型枚举
 *
 * @author alex
 * @Date: 2021/3/5
 */
@InitEnumToMapAn(name = "menuType")
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MenuTypeEnum implements IEnum<Integer> {

    MENU(1, "菜单"),
    FUN(2, "接口"),

    NOT_FOUND(null,"");


    @JsonValue
    private Integer value;
    private String desc;

    private static Log log = LogFactory.get(MenuTypeEnum.class);

    MenuTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }
    ;
    @Override
    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }
}
